<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form th:method="${method}" th:action="@{/insert}">
        <span th:style="${color}">用户名</span>
        <input type="text" th:name="${name}" th:value="${value}">
        <br/>
        <input type="submit" value="提交" th:onclick="show()">
    </form>
</body>
</html>
<script>
    function show() {
        alert("点击了");
    }
</script>